import request from '@/utils/request'

// 查询秒杀列表
export function listActivity(query) {
  return request({
    url: '/shop/activity/list',
    method: 'get',
    params: query
  })
}

// 查询秒杀详细
export function getActivity(activityId) {
  return request({
    url: '/shop/activity/getActivity/' + activityId,
    method: 'get'
  })
}

// 新增秒杀
export function addActivity(data) {
  return request({
    url: '/shop/activity/add',
    method: 'post',
    data: data
  })
}

// 修改秒杀
export function updateActivity(data) {
  return request({
    url: '/shop/activity/updata',
    method: 'put',
    data: data
  })
}

// 删除秒杀
export function delActivity(activityId) {
  return request({
    url: '/shop/activity/delete/' + activityId,
    method: 'delete'
  })
}
